[gcode_macro PartyTime]
gcode:
    {% for flashes in range(params.COUNT|default(10)|int) %}
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=1 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=2 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=3 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=4 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=5 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=6 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=7 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=8 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=9 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=10 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=11 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=12 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=13 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=14 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=15 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=16 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=17 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=18 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=19 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=20 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=21 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=22 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=23 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=24 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=25 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=26 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=27 TRANSMIT=1
	G4 P250                       ; sleep 250ms
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=3 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=4 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=5 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=6 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=7 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=8 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=9 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=10 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=11 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=12 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=13 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=14 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=15 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=16 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=17 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=18 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=19 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=20 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=21 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=22 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=23 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=24 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=25 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=26 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=27 TRANSMIT=1
        SET_LED LED=printhead RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=printhead RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=printhead RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=3 TRANSMIT=1       
	G4 P250                       ; sleep 250ms
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=3 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=4 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=5 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=6 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=7 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=8 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=9 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=10 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=11 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=12 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=13 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=14 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=15 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=16 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=17 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=18 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=19 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=20 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=21 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=22 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=23 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=24 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=25 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=26 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=27 TRANSMIT=1
        SET_LED LED=printhead RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=3 TRANSMIT=1
	G4 P250                       ; sleep 250ms
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=3 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=4 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=5 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=6 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=7 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=8 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=9 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=10 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=11 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=12 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=13 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=14 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=15 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=16 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=17 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=18 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=19 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=20 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=21 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=22 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=23 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=24 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=25 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=26 TRANSMIT=0
        SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=27 TRANSMIT=1
        SET_LED LED=printhead RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=1 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=2 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=3 TRANSMIT=1
	G4 P250                       ; sleep 250ms
    {% endfor %}
    SET_LED LED=my_neopixel RED=0.3 GREEN=0.3 BLUE=0.3
    SET_LED LED=printhead RED=0.12 GREEN=0.12 BLUE=0.12
[gcode_macro miniParty]
gcode:
    {% for flashes in range(params.COUNT|default(10)|int) %}
	G4 P250                       ; sleep 250ms
        SET_LED LED=printhead RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=printhead RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=printhead RED=0.5 GREEN=0.0 BLUE=0.0 INDEX=3 TRANSMIT=1       
	G4 P250                       ; sleep 250ms
        SET_LED LED=printhead RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=1 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=2 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.5 BLUE=0.0 INDEX=3 TRANSMIT=1
	G4 P250                       ; sleep 250ms
        SET_LED LED=printhead RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=1 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=2 TRANSMIT=0
        SET_LED LED=printhead RED=0.0 GREEN=0.0 BLUE=0.5 INDEX=3 TRANSMIT=1
	G4 P250                       ; sleep 250ms
    {% endfor %}
	SET_LED LED=printhead RED=0.12 GREEN=0.12 BLUE=0.12



# ну такое. показывает процент выполнения на светодиодах, прикольно на разок или на отдельную ленту или на ее кусок. но уж точно не на всю
#[gcode_macro _set_leds]
#gcode:
#    {% if printer.extruder.target == 0 %} 
#        # the extrude heater is off 
#    {% else %}
#        # the extrude heater is on
#        {% if printer.idle_timeout.state == "Printing" %}
#            # we are printing 
#            # progress is in the display_status object 
#            {% set perc = printer.display_status.progress %} 
#            # set this to how many leds you have for your bar (в следующей строке указываем количество светодиодов в ленте)
#            {% set numleds = 27 %}
#            {% set last = (perc|float * numleds|float)|int %}
#            {% for n in range(numleds) %} 
#                {% if n < last %} 
#			#не забываем прописать имя нашей ленты. в чветах указываются параметры цвета заполнения цвета пикселя и цвета остатка ленты
#                    SET_LED LED=my_neopixel RED=0 GREEN=0.25 BLUE=0.0 TRANSMIT=0 index={ n + 1|int }
#                {% else %} 
#                    SET_LED LED=my_neopixel RED=0.25 GREEN=0.25 BLUE=0.25 TRANSMIT=0 index={ n + 1|int }
#                {% endif %}
#            {% endfor %}
#            # now actually transmit it
#            SET_LED LED=my_neopixel RED=0.25 GREEN=0 BLUE=0 TRANSMIT=1 INDEX={ last + 1|int }
#        {% endif %}
#    {% endif %}
#    #кусок кода отвечающий за обновление
#[delayed_gcode _update_leds_loop]
#initial_duration: 5 
#gcode:
#    _set_leds 
#    UPDATE_DELAYED_GCODE ID=_update_leds_loop DURATION=60
